﻿<%@ Page Language="VB" MasterPageFile="~/HelpDesk.master" AutoEventWireup="false"
    CodeFile="ClientsForm.aspx.vb" Inherits="Admin_ClientsForm" Title="Modifier"
    Theme="HelpDesk" Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:SqlDataSource ID="SqlEntreprise" runat="server" ConnectionString="<%$ ConnectionStrings:HelpDeskCS %>"
        DeleteCommand="DELETE FROM [Entreprise] WHERE [entreprise_id] = @entreprise_id"
        InsertCommand="INSERT INTO [Entreprise] ([entreprise_nom], [entreprise_nomlong], [entreprise_adresse], [entreprise_tel], [entreprise_fax], [entreprise_mail]) VALUES (@entreprise_nom, @entreprise_nomlong, @entreprise_adresse, @entreprise_tel, @entreprise_fax, @entreprise_mail)"
        SelectCommand="SELECT [entreprise_id], [entreprise_nom], [entreprise_nomlong], [entreprise_adresse], [entreprise_tel], [entreprise_fax], [entreprise_mail] FROM [Entreprise] WHERE ([entreprise_id] = @entreprise_id)"
        UpdateCommand="UPDATE [Entreprise] SET [entreprise_nom] = @entreprise_nom, [entreprise_nomlong] = @entreprise_nomlong, [entreprise_adresse] = @entreprise_adresse, [entreprise_tel] = @entreprise_tel, [entreprise_fax] = @entreprise_fax, [entreprise_mail] = @entreprise_mail WHERE [entreprise_id] = @entreprise_id">
        <DeleteParameters>
            <asp:QueryStringParameter Name="entreprise_id" QueryStringField="entreprise_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="entreprise_nom" Type="String" />
            <asp:Parameter Name="entreprise_nomlong" Type="String" />
            <asp:Parameter Name="entreprise_adresse" Type="String" />
            <asp:Parameter Name="entreprise_tel" Type="String" />
            <asp:Parameter Name="entreprise_fax" Type="String" />
            <asp:Parameter Name="entreprise_mail" Type="String" />
            <asp:Parameter Name="entreprise_id" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="entreprise_id" QueryStringField="entreprise_id" Type="Int32" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="entreprise_nom" Type="String" />
            <asp:Parameter Name="entreprise_nomlong" Type="String" />
            <asp:Parameter Name="entreprise_adresse" Type="String" />
            <asp:Parameter Name="entreprise_tel" Type="String" />
            <asp:Parameter Name="entreprise_fax" Type="String" />
            <asp:Parameter Name="entreprise_mail" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:FormView ID="FormViewEntreprise" runat="server" DataKeyNames="entreprise_id"
        DataSourceID="SqlEntreprise" DefaultMode="Insert" meta:resourcekey="FormViewEntrepriseResource1">
        <EditItemTemplate>
            <h1>
                <asp:Literal ID="Literal1" runat="server" meta:resourcekey="Literal1Resource1" Text="Editer le client"></asp:Literal>
            </h1>
            <p>
                <label>
                    <asp:Literal ID="Literal2" runat="server" meta:resourcekey="Literal2Resource1" Text="<%$ Resources:Clients, ShortName %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_nomTextBox" runat="server" Text='<%# Bind("entreprise_nom") %>'
                    MaxLength="100" Columns="20" meta:resourcekey="entreprise_nomTextBoxResource1"></asp:TextBox>
            </p>
            <p>
                <label>
                    <asp:Literal ID="Literal3" runat="server" meta:resourcekey="Literal3Resource1" Text="<%$ Resources:Clients, FullName %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="TextBox1" runat="server" MaxLength="255" Columns="50" Text='<%# Bind("entreprise_nomlong") %>'
                    meta:resourcekey="TextBox1Resource1"></asp:TextBox>
            </p>
            <p>
                <label>
                    <asp:Literal ID="Literal4" runat="server" meta:resourcekey="Literal4Resource1" Text="<%$ Resources:Clients, Adress %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_adresseTextBox" runat="server" Text='<%# Bind("entreprise_adresse") %>'
                    MaxLength="250" Columns="50" meta:resourcekey="entreprise_adresseTextBoxResource1"></asp:TextBox>
            </p>
            <p>
                <label>
                    <asp:Literal ID="Literal5" runat="server" meta:resourcekey="Literal5Resource1" Text="<%$ Resources:Clients, Phone %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_telTextBox" runat="server" Text='<%# Bind("entreprise_tel") %>'
                    Columns="10" MaxLength="20" meta:resourcekey="entreprise_telTextBoxResource1"></asp:TextBox></p>
            <p>
                <label>
                    <asp:Literal ID="Literal6" runat="server" meta:resourcekey="Literal6Resource1" Text="<%$ Resources:Clients, Fax %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_faxTextBox" runat="server" Text='<%# Bind("entreprise_fax") %>'
                    Columns="10" MaxLength="20" meta:resourcekey="entreprise_faxTextBoxResource1"></asp:TextBox></p>
            <p>
                <label>
                    <asp:Literal ID="Literal7" runat="server" meta:resourcekey="Literal7Resource1" Text="<%$ Resources:Clients, Email %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_mailTextBox" runat="server" Text='<%# Bind("entreprise_mail") %>'
                    MaxLength="150" Columns="35" meta:resourcekey="entreprise_mailTextBoxResource1"></asp:TextBox>
            </p>
            <p>
                <label>
                    &nbsp;</label>
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="<%$ Resources:WebResource, ButtonSave %>"
                    meta:resourcekey="UpdateButtonResource1"></asp:Button>
                <asp:HyperLink ID="CancelButton" runat="server" NavigateUrl="~/Admin/Clients.aspx"
                    meta:resourcekey="CancelButtonResource1" Text="<%$ Resources:WebResource, ButtonCancel %>"></asp:HyperLink>
            </p>
            <p align="right">
                <asp:LinkButton runat="server" ID="DeleteButton" CommandName="Delete" OnClientClick="return confirm('Voulez-vous vraiment supprimer ce client ?')"
                    meta:resourcekey="DeleteButtonResource1" Text='&#13;&#10;                        <img src="../Images/Icones/vcard_delete.png" alt="" />&#13;&#10;                        Supprimer'></asp:LinkButton>
            </p>
        </EditItemTemplate>
        <InsertItemTemplate>
            <h1>
                <asp:Literal ID="Literal14" runat="server" meta:resourcekey="Literal14Resource1"
                    Text="Nouveau client"></asp:Literal>
            </h1>
            <p>
                <label>
                    <asp:Literal ID="Literal8" runat="server" meta:resourcekey="Literal8Resource1" Text="<%$ Resources:Clients, ShortName %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_nomTextBox" runat="server" Text='<%# Bind("entreprise_nom") %>'
                    MaxLength="100" Columns="35" meta:resourcekey="entreprise_nomTextBoxResource2"></asp:TextBox>
            </p>
            <p>
                <label>
                    <asp:Literal ID="Literal9" runat="server" meta:resourcekey="Literal9Resource1" Text="<%$ Resources:Clients, FullName %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="TextBox1" runat="server" MaxLength="255" Columns="50" Text='<%# Bind("entreprise_nomlong") %>'
                    meta:resourcekey="TextBox1Resource2"></asp:TextBox>
            </p>
            <p>
                <label>
                    <asp:Literal ID="Literal10" runat="server" meta:resourcekey="Literal10Resource1"
                        Text="<%$ Resources:Clients, Adress %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_adresseTextBox" runat="server" Text='<%# Bind("entreprise_adresse") %>'
                    MaxLength="250" Columns="50" meta:resourcekey="entreprise_adresseTextBoxResource2"></asp:TextBox>
            </p>
            <p>
                <label>
                    <asp:Literal ID="Literal11" runat="server" meta:resourcekey="Literal11Resource1"
                        Text="<%$ Resources:Clients, Phone %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_telTextBox" runat="server" Text='<%# Bind("entreprise_tel") %>'
                    Columns="10" MaxLength="20" meta:resourcekey="entreprise_telTextBoxResource2"></asp:TextBox></p>
            <p>
                <label>
                    <asp:Literal ID="Literal12" runat="server" meta:resourcekey="Literal12Resource1"
                        Text="<%$ Resources:Clients, Fax %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_faxTextBox" runat="server" Text='<%# Bind("entreprise_fax") %>'
                    Columns="10" MaxLength="20" meta:resourcekey="entreprise_faxTextBoxResource2"></asp:TextBox></p>
            <p>
                <label>
                    <asp:Literal ID="Literal13" runat="server" meta:resourcekey="Literal13Resource1"
                        Text="<%$ Resources:Clients, Email %>"></asp:Literal>&nbsp;</label>
                <asp:TextBox ID="entreprise_mailTextBox" runat="server" Text='<%# Bind("entreprise_mail") %>'
                    MaxLength="150" Columns="35" meta:resourcekey="entreprise_mailTextBoxResource2"></asp:TextBox>
            </p>
            <p>
                <label>
                    &nbsp;</label>
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="<%$ Resources:WebResource, ButtonSave %>"
                    meta:resourcekey="InsertButtonResource1"></asp:Button>
                <asp:HyperLink ID="CancelButton" runat="server" NavigateUrl="~/Admin/Clients.aspx"
                    meta:resourcekey="CancelButtonResource2" Text="<%$ Resources:WebResource, ButtonCancel %>"></asp:HyperLink>
            </p>
        </InsertItemTemplate>
    </asp:FormView>
</asp:Content>
